home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Mastering Web Site Development
/
Microsoft Mastering Web Site Development (Microsoft) (1997).iso
/
Media
/
Ch03
/
W03D020.cc2
< prev
next >
Wrap
Text File
|
1997-04-24
|
2KB
|
42 lines
0, In this demonstration, you will see how to use
5, database diagrams in Visual InterDev to modify the
9, structure of a SQL server database. In my project I
14, have added a data connection to a Microsoft SQL
18, server database. When you add a data connection, the
21, Data View tab is added to your workspace window.
26, From Data View you can create a database diagram.
30, To create a new database diagram, from the Insert
34, menu, click New Database Item. Select Database
39, Diagram and click OK. The Database Diagram toolbar is
47, displayed. To add tables to the diagram, drag the
52, table from data view to the diagram window. I'll
57, add Classes, Enrollment, and Students to the
60, diagram. If the tables are related, a join line appears
76, in the diagram. If you move your cursor over the
80, join line, pop-up text displays information on the
84, join. To create a relationship between two tables,
89, drag a field from one table to another. I'll
93, create a relationship between Enrollment and Classes.
98, In the Create Relationship dialog box, you can
102, specify properties of the relationship, and click OK.
109, To change the structure of a table, click the
113, Show Columns property on the Database Diagram
116, toolbar. You can change the definition of existing
121, columns and add new columns. I'll add an "Instructor"
127, column to the Classes table. You can also add new
140, tables to your database. To add new tables, click New
145, Table on the Database Diagram toolbar. All of the
152, changes that you make to the database are
154, temporary until you save the diagram. To see an SQL script
161, of your changes, click the Save Change Script
164, icon. You can save this script to a text file and
170, then use a tool, such as ISQL, to apply the changes
175, at a later date. I'll save my diagram and apply the
180, changes immediately. If I now look at the design
195, of the Classes table, you will see the new column,
199, Instructor, has been added to the table. So, in
205, this demonstration you have seen how to use
208, database diagrams to modify the structure of a SQL
212, server database.
216, END